<?php
require_once "../includes/class/bargain_management.class.php";
require_once "../includes/class/product_management.class.php";

$bargainObject = new bargain_management;
$productObject = new product_management;

$proId=$_GET['listpro'];

$products = $productObject->getProductById($proId);

$productName=$products['product_name'];	
$productDesc=$products['product_description'];
$productCategory=$products['category_id'];
$productPrice=$products['product_price'];

$pimage = getProductImage($proId,'p');
if($pimage['thumb']!="") {
$productThumb = "../".$pimage['thumb'];
} else {
$productThumb="../images/no_image.gif";	
}														
		  
$catInfo=getCategory($productCategory);

?>
<style type="text/css">
	span#add-wishlist { color:#0000CC; padding:5px; font-size:12px; }
	div#bargain-box { border:1px solid #CCC; padding:10px; text-align:center; vertical-align:middle; }
	div#rst-bargain { margin:1px; color:#FF0000; padding:10px; border:1px solid #CCC; }
</style>
<table width="100%"  border="1" cellspacing="0" class="container">
  <tr>
    <td width="469" height="25" class="tdHeader">Product details</td>
  </tr>
  <tr>
    <td height="577">
	<br><span id='listed-in'><strong>Listed in:</strong> <?php echo $catInfo['categoryName']; ?> >> <?php echo $catInfo['subcategoryName']; ?></span>
	   <br style="clear:both;"><br>   
	  
	   <form name="frmProductInfo" id="frmProductInfo" method="post">
	   		<input type="hidden" name="hidBargain" id="hidBargain">
	   <table width="100%" border="0" align="center">
           <tr>
             <td width="47%">              
             	<div align="center" style="border:1px solid #CCC; padding:15px;"> <?php echo "<img src='$productThumb'> <br>"; ?> </div></td>
             <td width="53%"><table  border="0" align="center" width="100%">
               <tr>
                 <td height="30" colspan="3" class="uline" align="center"><strong> <?php echo $productName; ?></strong></td>
               </tr>
               <tr>
                 <td width="7%" height="28" class="uline">&nbsp;</td>
                 <td width="29%" class="uline">Category</td>
                 <td width="64%" class="uline"><strong>: 
				 	<?php
						echo $catInfo['categoryName'];
					?>
				 </strong></td>
               </tr>
              
			  <?php if($catInfo['subcategoryName']!="") { ?>
			  	<tr>
                 <td height="28" class="uline">&nbsp;</td>
                 <td class="uline">Sub category</td>
                 <td class="uline"><strong>: 
				 	<?php
						echo $catInfo['subcategoryName'];
					?>
				 </strong></td>
               </tr>
			  <?php } ?>
			  
               <tr>
                 <td height="27" class="uline">&nbsp;</td>
                 <td class="uline">Time Left</td>
                 <td class="uline"><strong>: --</strong></td>
               </tr>
              
               <tr>
                 <td height="28" class="uline">&nbsp;</td>
                 <td class="uline">Price</td>
                 <td class="uline"><strong> : $<?php echo $productPrice; ?></strong></td>
               </tr>
             
             </table></td>
           </tr>
         
		   <tr> <td colspan="2">&nbsp;</td> </tr>
		   <tr>
		   	<td colspan="2">
				<strong>Description </strong>
				<p style="text-indent:20px; line-height:22px;">
					<?php echo nl2br($productDesc); ?>
				</p>
			</td>
		   </tr>
		   <tr> <td colspan="2">&nbsp;</td> </tr>
         </table>
		 </form>
		 <?php include_once "product_offer.php"; ?>
    </td>
  </tr>
</table>		 